package Application.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

import Application.entity.Discuss;

public interface DiscussDao {
	@Insert("insert into discuss(content,essayid,discusserid,discusser,date)value(#{content},#{essayid},#{discusserid},#{discusser},#{date}) ")
	@Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
	public void insertDiscuss(Discuss discuss);

	@Select("select * from discuss where essayid=#{essayid}")
	public List<Discuss> findDiscussByEssayId(int essayid);
}
